<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-pragma">{-# LANGUAGE BangPatterns #-}</span><span>
</span><span id="line-2"></span><span class="hs-pragma">{-# LANGUAGE NoImplicitPrelude #-}</span><span>
</span><span id="line-3"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">GHC.Event.Windows.Clock</span><span> </span><span class="hs-special">(</span><span>
</span><span id="line-4"></span><span>    </span><span class="annot"><a href="GHC.Event.Windows.Clock.html#Clock"><span class="hs-identifier">Clock</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-5"></span><span>    </span><span class="annot"><a href="GHC.Event.Windows.Clock.html#Seconds"><span class="hs-identifier">Seconds</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-6"></span><span>    </span><span class="annot"><a href="GHC.Event.Windows.Clock.html#getTime"><span class="hs-identifier">getTime</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-7"></span><span>    </span><span class="annot"><a href="GHC.Event.Windows.Clock.html#getClock"><span class="hs-identifier">getClock</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-8"></span><span>
</span><span id="line-9"></span><span>    </span><span class="annot"><span class="hs-comment">-- * Specific implementations</span></span><span>
</span><span id="line-10"></span><span>    </span><span class="annot"><a href="GHC.Event.Windows.Clock.html#queryPerformanceCounter"><span class="hs-identifier">queryPerformanceCounter</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-11"></span><span>    </span><span class="annot"><a href="GHC.Event.Windows.Clock.html#getTickCount64"><span class="hs-identifier">getTickCount64</span></a></span><span>
</span><span id="line-12"></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-13"></span><span>
</span><span id="line-14"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="GHC.Event.Windows.FFI.html"><span class="hs-identifier">GHC.Event.Windows.FFI</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">FFI</span></span><span>
</span><span id="line-15"></span><span>
</span><span id="line-16"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Data.Maybe.html"><span class="hs-identifier">Data.Maybe</span></a></span><span>
</span><span id="line-17"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Base.html"><span class="hs-identifier">GHC.Base</span></a></span><span>
</span><span id="line-18"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Real.html"><span class="hs-identifier">GHC.Real</span></a></span><span>
</span><span id="line-19"></span><span>
</span><span id="line-20"></span><span class="hs-comment">-- | Monotonic clock</span><span>
</span><span id="line-21"></span><span class="hs-keyword">newtype</span><span> </span><span id="Clock"><span class="annot"><a href="GHC.Event.Windows.Clock.html#Clock"><span class="hs-identifier hs-var">Clock</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="Clock"><span class="annot"><a href="GHC.Event.Windows.Clock.html#Clock"><span class="hs-identifier hs-var">Clock</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#IO"><span class="hs-identifier hs-type">IO</span></a></span><span> </span><span class="annot"><a href="GHC.Event.Windows.Clock.html#Seconds"><span class="hs-identifier hs-type">Seconds</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-22"></span><span>
</span><span id="line-23"></span><span class="hs-keyword">type</span><span> </span><span id="Seconds"><span class="annot"><a href="GHC.Event.Windows.Clock.html#Seconds"><span class="hs-identifier hs-var">Seconds</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Double"><span class="hs-identifier hs-type">Double</span></a></span><span>
</span><span id="line-24"></span><span>
</span><span id="line-25"></span><span class="hs-comment">-- | Get the current time, in seconds since some fixed time in the past.</span><span>
</span><span id="line-26"></span><span class="annot"><a href="GHC.Event.Windows.Clock.html#getTime"><span class="hs-identifier hs-type">getTime</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Event.Windows.Clock.html#Clock"><span class="hs-identifier hs-type">Clock</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#IO"><span class="hs-identifier hs-type">IO</span></a></span><span> </span><span class="annot"><a href="GHC.Event.Windows.Clock.html#Seconds"><span class="hs-identifier hs-type">Seconds</span></a></span><span>
</span><span id="line-27"></span><span id="getTime"><span class="annot"><span class="annottext">getTime :: Clock -&gt; IO Seconds
</span><a href="GHC.Event.Windows.Clock.html#getTime"><span class="hs-identifier hs-var hs-var">getTime</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Event.Windows.Clock.html#Clock"><span class="hs-identifier hs-type">Clock</span></a></span><span> </span><span id="local-6989586621679551499"><span class="annot"><span class="annottext">IO Seconds
</span><a href="#local-6989586621679551499"><span class="hs-identifier hs-var">io</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IO Seconds
</span><a href="#local-6989586621679551499"><span class="hs-identifier hs-var">io</span></a></span><span>
</span><span id="line-28"></span><span>
</span><span id="line-29"></span><span class="hs-comment">-- | Figure out what time API to use, and return a 'Clock' for accessing it.</span><span>
</span><span id="line-30"></span><span class="annot"><a href="GHC.Event.Windows.Clock.html#getClock"><span class="hs-identifier hs-type">getClock</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#IO"><span class="hs-identifier hs-type">IO</span></a></span><span> </span><span class="annot"><a href="GHC.Event.Windows.Clock.html#Clock"><span class="hs-identifier hs-type">Clock</span></a></span><span>
</span><span id="line-31"></span><span id="getClock"><span class="annot"><span class="annottext">getClock :: IO Clock
</span><a href="GHC.Event.Windows.Clock.html#getClock"><span class="hs-identifier hs-var hs-var">getClock</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[IO (Maybe Clock)] -&gt; IO Clock
forall (m :: * -&gt; *) a. Monad m =&gt; [m (Maybe a)] -&gt; m a
</span><a href="GHC.Event.Windows.Clock.html#tryInOrder"><span class="hs-identifier hs-var">tryInOrder</span></a></span><span>
</span><span id="line-32"></span><span>           </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">IO (Maybe Clock)
</span><a href="GHC.Event.Windows.Clock.html#queryPerformanceCounter"><span class="hs-identifier hs-var">queryPerformanceCounter</span></a></span><span>
</span><span id="line-33"></span><span>           </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">(Clock -&gt; Maybe Clock) -&gt; IO Clock -&gt; IO (Maybe Clock)
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="GHC.Base.html#fmap"><span class="hs-identifier hs-var">fmap</span></a></span><span> </span><span class="annot"><span class="annottext">Clock -&gt; Maybe Clock
forall a. a -&gt; Maybe a
</span><a href="GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">IO Clock
</span><a href="GHC.Event.Windows.Clock.html#getTickCount64"><span class="hs-identifier hs-var">getTickCount64</span></a></span><span>
</span><span id="line-34"></span><span>           </span><span class="hs-special">]</span><span>
</span><span id="line-35"></span><span>
</span><span id="line-36"></span><span id="local-6989586621679551552"><span id="local-6989586621679551553"><span class="annot"><a href="GHC.Event.Windows.Clock.html#tryInOrder"><span class="hs-identifier hs-type">tryInOrder</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Base.html#Monad"><span class="hs-identifier hs-type">Monad</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679551553"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679551553"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679551552"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679551553"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679551552"><span class="hs-identifier hs-type">a</span></a></span></span></span><span>
</span><span id="line-37"></span><span id="tryInOrder"><span class="annot"><span class="annottext">tryInOrder :: forall (m :: * -&gt; *) a. Monad m =&gt; [m (Maybe a)] -&gt; m a
</span><a href="GHC.Event.Windows.Clock.html#tryInOrder"><span class="hs-identifier hs-var hs-var">tryInOrder</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679551491"><span class="annot"><span class="annottext">m (Maybe a)
</span><a href="#local-6989586621679551491"><span class="hs-identifier hs-var">x</span></a></span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679551490"><span class="annot"><span class="annottext">[m (Maybe a)]
</span><a href="#local-6989586621679551490"><span class="hs-identifier hs-var">xs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">m (Maybe a)
</span><a href="#local-6989586621679551491"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">m (Maybe a) -&gt; (Maybe a -&gt; m a) -&gt; m a
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; (a -&gt; m b) -&gt; m b
</span><a href="GHC.Base.html#%3E%3E%3D"><span class="hs-operator hs-var">&gt;&gt;=</span></a></span><span> </span><span class="annot"><span class="annottext">m a -&gt; (a -&gt; m a) -&gt; Maybe a -&gt; m a
forall b a. b -&gt; (a -&gt; b) -&gt; Maybe a -&gt; b
</span><a href="Data.Maybe.html#maybe"><span class="hs-identifier hs-var">maybe</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[m (Maybe a)] -&gt; m a
forall (m :: * -&gt; *) a. Monad m =&gt; [m (Maybe a)] -&gt; m a
</span><a href="GHC.Event.Windows.Clock.html#tryInOrder"><span class="hs-identifier hs-var">tryInOrder</span></a></span><span> </span><span class="annot"><span class="annottext">[m (Maybe a)]
</span><a href="#local-6989586621679551490"><span class="hs-identifier hs-var">xs</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">a -&gt; m a
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span>
</span><span id="line-38"></span><span class="annot"><a href="GHC.Event.Windows.Clock.html#tryInOrder"><span class="hs-identifier hs-var">tryInOrder</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">m a
forall a. HasCallStack =&gt; a
</span><a href="GHC.Err.html#undefined"><span class="hs-identifier hs-var">undefined</span></a></span><span>
</span><span id="line-39"></span><span>
</span><span id="line-40"></span><span id="local-6989586621679551534"><span id="local-6989586621679551535"><span id="local-6989586621679551536"><span class="annot"><a href="GHC.Event.Windows.Clock.html#mapJust"><span class="hs-identifier hs-type">mapJust</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Base.html#Monad"><span class="hs-identifier hs-type">Monad</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679551536"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679551536"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679551535"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679551535"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679551534"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679551536"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679551534"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">)</span></span></span></span><span>
</span><span id="line-41"></span><span id="mapJust"><span class="annot"><span class="annottext">mapJust :: forall (m :: * -&gt; *) a b.
Monad m =&gt;
m (Maybe a) -&gt; (a -&gt; b) -&gt; m (Maybe b)
</span><a href="GHC.Event.Windows.Clock.html#mapJust"><span class="hs-identifier hs-var hs-var">mapJust</span></a></span></span><span> </span><span id="local-6989586621679551482"><span class="annot"><span class="annottext">m (Maybe a)
</span><a href="#local-6989586621679551482"><span class="hs-identifier hs-var">m</span></a></span></span><span> </span><span id="local-6989586621679551481"><span class="annot"><span class="annottext">a -&gt; b
</span><a href="#local-6989586621679551481"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Maybe a -&gt; Maybe b) -&gt; m (Maybe a) -&gt; m (Maybe b)
forall (m :: * -&gt; *) a1 r. Monad m =&gt; (a1 -&gt; r) -&gt; m a1 -&gt; m r
</span><a href="GHC.Base.html#liftM"><span class="hs-identifier hs-var">liftM</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(a -&gt; b) -&gt; Maybe a -&gt; Maybe b
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="GHC.Base.html#fmap"><span class="hs-identifier hs-var">fmap</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; b
</span><a href="#local-6989586621679551481"><span class="hs-identifier hs-var">f</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">m (Maybe a)
</span><a href="#local-6989586621679551482"><span class="hs-identifier hs-var">m</span></a></span><span>
</span><span id="line-42"></span><span>
</span><span id="line-43"></span><span class="annot"><a href="GHC.Event.Windows.Clock.html#queryPerformanceCounter"><span class="hs-identifier hs-type">queryPerformanceCounter</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#IO"><span class="hs-identifier hs-type">IO</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="GHC.Event.Windows.Clock.html#Clock"><span class="hs-identifier hs-type">Clock</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-44"></span><span id="queryPerformanceCounter"><span class="annot"><span class="annottext">queryPerformanceCounter :: IO (Maybe Clock)
</span><a href="GHC.Event.Windows.Clock.html#queryPerformanceCounter"><span class="hs-identifier hs-var hs-var">queryPerformanceCounter</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-45"></span><span>    </span><span class="annot"><span class="annottext">IO (Maybe Int64)
</span><a href="GHC.Event.Windows.FFI.html#queryPerformanceFrequency"><span class="hs-identifier hs-var">FFI.queryPerformanceFrequency</span></a></span><span> </span><span class="annot"><span class="annottext">IO (Maybe Int64) -&gt; (Int64 -&gt; Clock) -&gt; IO (Maybe Clock)
forall (m :: * -&gt; *) a b.
Monad m =&gt;
m (Maybe a) -&gt; (a -&gt; b) -&gt; m (Maybe b)
</span><a href="GHC.Event.Windows.Clock.html#mapJust"><span class="hs-operator hs-var">`mapJust`</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621679551478"><span class="annot"><span class="annottext">Int64
</span><a href="#local-6989586621679551478"><span class="hs-identifier hs-var">freq</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-46"></span><span>    </span><span class="annot"><span class="annottext">IO Seconds -&gt; Clock
</span><a href="GHC.Event.Windows.Clock.html#Clock"><span class="hs-identifier hs-var">Clock</span></a></span><span> </span><span class="annot"><span class="annottext">(IO Seconds -&gt; Clock) -&gt; IO Seconds -&gt; Clock
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="GHC.Base.html#%24%21"><span class="hs-operator hs-var">$!</span></a></span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-47"></span><span>        </span><span id="local-6989586621679551476"><span class="annot"><span class="annottext">Int64
</span><a href="#local-6989586621679551476"><span class="hs-identifier hs-var">count</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">IO Int64
</span><a href="GHC.Event.Windows.FFI.html#queryPerformanceCounter"><span class="hs-identifier hs-var">FFI.queryPerformanceCounter</span></a></span><span>
</span><span id="line-48"></span><span>        </span><span class="hs-keyword">let</span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621679551468"><span class="annot"><span class="annottext">secs :: Seconds
</span><a href="#local-6989586621679551468"><span class="hs-identifier hs-var hs-var">secs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int64 -&gt; Seconds
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="annot"><span class="annottext">Int64
</span><a href="#local-6989586621679551476"><span class="hs-identifier hs-var">count</span></a></span><span> </span><span class="annot"><span class="annottext">Seconds -&gt; Seconds -&gt; Seconds
forall a. Fractional a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Real.html#%2F"><span class="hs-operator hs-var">/</span></a></span><span> </span><span class="annot"><span class="annottext">Int64 -&gt; Seconds
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="annot"><span class="annottext">Int64
</span><a href="#local-6989586621679551478"><span class="hs-identifier hs-var">freq</span></a></span><span>
</span><span id="line-49"></span><span>        </span><span class="annot"><span class="annottext">Seconds -&gt; IO Seconds
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Seconds
</span><a href="#local-6989586621679551468"><span class="hs-identifier hs-var">secs</span></a></span><span>
</span><span id="line-50"></span><span>
</span><span id="line-51"></span><span class="annot"><a href="GHC.Event.Windows.Clock.html#getTickCount64"><span class="hs-identifier hs-type">getTickCount64</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#IO"><span class="hs-identifier hs-type">IO</span></a></span><span> </span><span class="annot"><a href="GHC.Event.Windows.Clock.html#Clock"><span class="hs-identifier hs-type">Clock</span></a></span><span>
</span><span id="line-52"></span><span id="getTickCount64"><span class="annot"><span class="annottext">getTickCount64 :: IO Clock
</span><a href="GHC.Event.Windows.Clock.html#getTickCount64"><span class="hs-identifier hs-var hs-var">getTickCount64</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-53"></span><span>    </span><span class="annot"><span class="annottext">Clock -&gt; IO Clock
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">(Clock -&gt; IO Clock) -&gt; Clock -&gt; IO Clock
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="GHC.Base.html#%24%21"><span class="hs-operator hs-var">$!</span></a></span><span> </span><span class="annot"><span class="annottext">IO Seconds -&gt; Clock
</span><a href="GHC.Event.Windows.Clock.html#Clock"><span class="hs-identifier hs-var">Clock</span></a></span><span> </span><span class="annot"><span class="annottext">(IO Seconds -&gt; Clock) -&gt; IO Seconds -&gt; Clock
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="GHC.Base.html#%24%21"><span class="hs-operator hs-var">$!</span></a></span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-54"></span><span>      </span><span id="local-6989586621679551466"><span class="annot"><span class="annottext">Word64
</span><a href="#local-6989586621679551466"><span class="hs-identifier hs-var">msecs</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">IO Word64
</span><a href="GHC.Event.Windows.FFI.html#getTickCount64"><span class="hs-identifier hs-var">FFI.getTickCount64</span></a></span><span>
</span><span id="line-55"></span><span>      </span><span class="annot"><span class="annottext">Seconds -&gt; IO Seconds
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">(Seconds -&gt; IO Seconds) -&gt; Seconds -&gt; IO Seconds
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="GHC.Base.html#%24%21"><span class="hs-operator hs-var">$!</span></a></span><span> </span><span class="annot"><span class="annottext">Word64 -&gt; Seconds
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="annot"><span class="annottext">Word64
</span><a href="#local-6989586621679551466"><span class="hs-identifier hs-var">msecs</span></a></span><span> </span><span class="annot"><span class="annottext">Seconds -&gt; Seconds -&gt; Seconds
forall a. Fractional a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Real.html#%2F"><span class="hs-operator hs-var">/</span></a></span><span> </span><span class="annot"><span class="annottext">Seconds
</span><span class="hs-number">1000</span></span><span>
</span><span id="line-56"></span></pre></body></html>